package exception;

import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseablDemo {
    public static void main(String[] args) {
        try(FileOutputStream fos=new FileOutputStream("fos.date")){
            fos.write(1);
        }catch (IOException e){
            System.out.println("异常");
        }
    }
}
